import request from "../utils/request.js"

export function login(params){
    //return 返回的是一个promise对象request()，，后续引用的时候request().then().catch
    return request({
        url:"/admin/admin/login",
        method:"post",
        data:params
    })
}

export function getBannerList(){
    return request({
        url:"/admin/banner/list",
        method:"get"
    })
}

export function addBannnerList(params){
    return request({
        url:"/admin/banner/add",
        method:"post",
        data:params
    })
}

export function delBannerList(bannerid){
    return request({
        url:"/admin/banner/delete",
        method:"get",
        params:{
            bannerid,
        }
    })
}

export function delBannerSelects(bannerid){
    return request({
        url:"/admin/banner/removeAll",
        method:"get",
        params:{
            bannerid,
        }
    })
}